package com.ylr.admin.common.vo.dept;

import com.ylr.base.common.jsr303.group.Save;
import com.ylr.base.common.jsr303.group.Update;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-09 21:23:34
 * className: DeptVo
 * version: 1.0
 * description:
 */
@Getter
@Setter
@ToString
public class DeptVo {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = Update.class)
    private Long id;

    /**
     * 父级主键
     */
    @NotBlank(message = "父级主键不能为空", groups = { Save.class, Update.class})
    private Long parentId;

    /**
     * 父级路径（存储所有父级部门id，‘-’分割）
     */
    @NotBlank(message = "父级路径不能为空", groups = { Save.class, Update.class})
    private String parentPath;

    /**
     * 部门名称
     */
    @NotBlank(message = "部门名称不能为空", groups = { Save.class, Update.class})
    private String deptName;

    /**
     * 部门编号
     */
    @NotBlank(message = "部门编号不能为空", groups = { Save.class, Update.class})
    private String code;

    /**
     * 部门等级
     */
    @NotNull(message = "部门等级不能为空", groups = { Save.class, Update.class})
    private Integer level;

    /**
     * 排序等级
     */
    @NotNull(message = "排序等级不能为空", groups = { Save.class, Update.class})
    private Integer sort;

    /**
     * 部门描述
     */
    private String remark;
}
